#ifndef QFINDVIEW_H
#define QFINDVIEW_H

#include <QWidget>
#include <QTreeWidget>

class   QFindBar;
class   PageInterface;
struct  QFindResult;
typedef QMap<QString,QString>  FindResult;

class QFindView : public QWidget
{
    Q_OBJECT
public:
    explicit QFindView(QWidget *parent = 0);
    void    addPage(PageInterface *page);
signals:

public slots:
    void    search(const QString &text,bool sensitive,bool whole);
    void    clear();
protected:
    QTreeWidget     *m_resultTree;
    QFindBar        *m_findBar;
    QList<PageInterface*> m_pages;
    QList<QFindResult*>     m_results;
    QMap<QTreeWidgetItem *,FindResult*>   m_items;
};

#endif // QFINDVIEW_H
